<?php
/**
 * @package EasyTop
 * @subpackage PlusTheme
 * Template Name: index-page
 */
get_header();
?>

<?php
wp_reset_postdata();
$args = array('post_type'=>'page', 'post_parent' => 919, 'posts_per_page' => 3);	
$the_query = new WP_Query( $args );
?>

<!-- ####################################################################################################### -->
<div class="wrapper col2">
  <div id="featured_slide">
    <div id="featured_content">
      <ul>
		<?php while ( $the_query->have_posts()) : $the_query->the_post();?>
        <li><img src="<?php easytop_thumb_img(get_the_ID(), 390, 260);?>" alt="<?php the_title();?>" />
          <div class="floater">
            <h2><?php the_title();?></h2>
            <p><?php the_excerpt();?></p>
			<p class="readmore"><a href="<?php the_permalink();?>">Continue Reading &raquo;</a></p>
          </div>
        </li>
		<?php endwhile;?>
      </ul>
    </div>
    <a href="javascript:void(0);" id="featured-item-prev"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/prev.png" alt="" /></a> <a href="javascript:void(0);" id="featured-item-next"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/next.png" alt="" /></a> </div>
</div>
<!-- ####################################################################################################### -->

<?php
wp_reset_postdata();
$args = array('post_type'=>'front', 'posts_per_page' => 3 );	
$the_query = new WP_Query( $args );
$p_count = 0;
?>
<div class="wrapper col3">
  <div id="container">
    <div class="homepage">
      <ul>
		<?php while ( $the_query->have_posts()) : $the_query->the_post(); $p_count++;?>
        <li <?php echo ($p_count==3)?'class="last"':'';?>>
          <h2><img src="<?php easytop_thumb_img(get_the_ID(), 60, 60);?>" alt="<?php the_title();?>" /><?php the_title();?></h2>
          <p><?php the_excerpt();?></p>
          <p class="readmore"><a href="<?php echo(types_render_field("target_page", array('raw'=>true))); ?>">Continue Reading &raquo;</a></p>
        </li>
		<?php endwhile;?>
      </ul>
      <br class="clear" />
    </div>
  </div>
</div>

<?php get_footer(); ?>
